﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfShopCollect.aspx.cs"
    Inherits="msBsc.WebUi.wfShopCollect" %>

<!DOCTYPE HTML>
<html>
<head id="Head1" runat="server"> 
    <title>店铺收藏管理</title> 
    <link rel="shortcut icon" href="/themes/Style1/Image/favicon.ico" type="image/x-icon" />
    <link href="/??themes/Style1/StyleQt.css" type="text/css" rel="stylesheet" />
    <script src='/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jBPage.js,themes/Style1/jsQt.js,jqPlugin/js/laytpl.js' type='text/javascript'></script>
    <script type="text/javascript">
        $(window).load(function () {

        });

        $(function () {
            $(".shop-order").live("mouseover", function () {
                $(this).removeClass("shop-order-hover").addClass("shop-order-hover");
            }).live("mouseout", function () {
                $(this).removeClass("shop-order-hover");
            });

            $(".shop-order-nav li").live("click", function () {
                var $self = $(this);
                if (!$self.hasClass("shop-order-nav-sel")) {
                    $self.prev().removeClass("shop-order-nav-sel");
                    $self.next().removeClass("shop-order-nav-sel");
                    $self.removeClass("shop-order-nav-sel").addClass("shop-order-nav-sel");
                    loadallgoodsitem($self.parent().parent().parent().parent().parent().attr("shop-id"), ($self.hasClass("new-sum") ? '0' : '1'));
                }
            });
        });
          
         

        function doToPageNm(_pNum) {
            var _jsParam = new jsonRow();
            GetFormJson("divCondition", _jsParam);
            _jsParam.AddCell("ACTION", "LoadShopDataList");
            _jsParam.AddCell("NEW_PAGE_NUM", _pNum || 1);
            _jsParam.AddCell("PAGE_ROW_COUNT", "28");
            _jsParam.AddCell("PAGE_ROW_SORT", ""); 
            ajaxComm(_jsParam);
        };
        function deletecoll(sshopid) {
            var _jsParam = new jsonRow();
            _jsParam.AddCell("ACTION", "deletecoll"); 
            _jsParam.AddCell("SHOP_IDS", sshopid);
            ajaxComm(_jsParam);
            $(".shop-order[shop-id='" + sshopid + "']").remove();
        };

        function updateTableHtml(_data) {
            var tpl = HtmlUtil.htmlDecode(document.getElementById('sys_imglist_temp').innerHTML);
            laytpl(tpl).render(_data, function (render) {
                $("#imglist").html(render);
            });

            $("#Ratecurrpage").val(_data.page);
            createPaging('ratepaginator', _data.page, _data.total, function (_topagenum) { doToPageNm(_topagenum); });
            loadallgoodsitem('','');
        };
        function loadallgoodsitem(sshopid,sdatatype) {
            var _jsParam = new jsonRow();
            _jsParam.AddCell("ACTION", "loadallgoodsitem");
            var idtm = "";
            $(".shop-order").each(function (ii, itm) {
                idtm += idtm == "" ? $(this).attr("shop-id") : "," + $(this).attr("shop-id");
            });
            idtm = sshopid || idtm;
            _jsParam.AddCell("SHOP_IDS", idtm);
            _jsParam.AddCell("DATA_TP", sdatatype);
            ajaxComm(_jsParam);
        };
        function updateGoodsTableHtml(_shopid,_data) {
            var tpl = HtmlUtil.htmlDecode(document.getElementById('sys_goodslist_temp').innerHTML);
            var $goodslist = $(".shop-order[shop-id='" + _shopid + "']").find(".shop-order-goods");
            if ($goodslist && $goodslist.length > 0) {
                laytpl(tpl).render(_data, function (render) {
                    $goodslist.html(render);
                });
            } 
        };
 
    </script> 
    <!--head fix rgn-->
    <style type="text/css">
         
    </style>
    <style type="text/css">
        html, body
        {
            background-color: White;
            margin-left: 0px;
            margin-top: 0px;
            margin-right: 0px;
            margin-bottom: 0px;
        }
        .img-item
        {
            float: left; 
            margin: 5px;
            padding: 5px; 
        }
        .img-item-select
        {
            border: 2px solid #C00;
        }
        .text-overflow
        {
            width: 120px;
            display: block; /*内联对象需加*/
            width: 31em;
            word-break: keep-all; /* 不换行 */
            white-space: nowrap; /* 不换行 */
            text-overflow: ellipsis; /* 当对象内文本溢出时显示省略标记(...) ；需与overflow:hidden;一起使用。*/
            overflow: hidden; /* 内容超出宽度时隐藏超出部分的内容 */
        }
        .text-overflow2
        {
            width: 120px;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
        }
        .shop-order
        {
            margin:5px;
            border: solid 1px #fff;
            border-bottom: solid 1px #eee;
            padding:10px;
            min-height:230px;
        }
        .shop-order-hover
        {
            border: solid 1px #c40000;
        } 
        .shop-order-nav li
        {  
            list-style:none;
            border: solid 1px #ddd;
            float:left;
            padding:3px 13px 3px 13px;
            text-align: center; 
            cursor: pointer;
        }
        .shop-order-nav li:hover
        {
            border: solid 1px #c40000;
            color:#f40;
            background-color:#f3f3f3;
        }
        .shop-order-nav-sel
        {
            color:#f40;
            background-color:#f3f3f3;
        }
    </style> 
</head>
<body>
    <input type="hidden" id="Ratecurrpage" value="1">
    <div id="mallPage" class="tms-page mallAct tmall-  page-not-market">
        <!-- -->
        <!--商城通用顶通-->
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetHeaderTopHtml()%>
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetHeaderLogoDealerHtml("会员中心")%>
        <div id="content" class="content" style=" padding-top: 10px;">
            <div class="page lang-zh-S">
                <div id="mytaobao-panel" class="grid-c2">
                    <div class="col-main" id="J_Col_Main" style="padding-bottom: 0;">
                        <div class="main-wrap">
                            <div id="main-content">
                                <div id="fragment1">
                                    <div style="margin: 5px;"> 
                                    </div>
                                    <div id="imglist" style="background-color: White; margin: 5px;">

                                     
                                    </div>
                                    <div style="clear: both; height: 10px; line-height: 10px;">
                                    </div>
                                    <div id="ratepaginator">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div> 
                    <!-- end col-main -->
                    <div class="col-sub" id="J_Col_Sub">
                        <%=new msBsc.WebUi.Code.QtHtmlGet().GetCustomMenu()%>
                    </div>
                    <div style="clear:both;"></div>
                </div>
                <!-- end mytaobao-panel -->
            </div>
        </div>
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetFloorHtml()%>
    </div>
    
    <input id="txtCurrDirId" type="hidden" value="" />
    <!-- template -->
    <textarea id="sys_imglist_temp" style="display: none;">  
        {{# if(d.rows.length == 0){ }} 
     <div class="no-result-box layout-center"> 
       没有收藏记录！
       </div> 
       {{#}}}
        {{# for(var i = 0, len = d.rows.length; i < len; i++){ }}
    <div class="shop-order" shop-id="{{d.rows[i].COMM_TENANT_ID}}">
        <div class="shop-order-left" style="float:left;width:260px;">
            <div class="shop-order-icon" style="float:left;width:50px; text-align:center;">
                <div style="width:54px;height:54px;">
                {{#if(d.rows[i].LOGO_IMG_URL!='' && d.rows[i].LOGO_IMG_URL!='undefined'){}}
                <img src="{{d.rows[i].LOGO_IMG_URL}}" alt="" style="max-width:50px;height:50px;"/>
                {{#}}}
                </div> 
            </div>
            <div class="shop-order-desc" style="float:left;width:200px; padding-left:10px; ">
                <p style="color:#333; font-weight:bold;"><a href="/c_ShopView.htm?ID={{d.rows[i].COMM_TENANT_ID}}" target="_blank" title="{{d.rows[i].COMM_TENANT_NME}}">{{d.rows[i].COMM_TENANT_NME}}</a></p>
                <p style="color:#888;display:none; ">备注：{{d.rows[i].REMARKS}}</p>
                <p><a href="javascript:void(0);return false;" onclick="loadSysHeadTemplate();" style="display:none;">填写备注</a></p>
                <div style=" position:relative; bottom:0px; font-weight:normal;">
                <input class="btn btn-mini btn-danger"  type="button" value="删除"  onclick="deletecoll('{{d.rows[i].COMM_TENANT_ID}}');"/>
                </div>
            </div>
        </div>
        <div class="shop-order-right" style="float:left;width:750px;">
            <div class="shop-order-nav">
            <div style="float:left;width:200px;">
            <ul>
            <li class="shop-order-nav-sel new-sum" >本月上新 <em>{{d.rows[i].NEW_GOODS_SUM}}</em></li>
            <li class="hot-sum">热销商品 <em>{{d.rows[i].HOT_GOODS_SUM}}</em></li>
            </ul>
            </div>
            <div style="float:right;width:540px; text-align:right;">
            <a href="/c_ShopView.htm?ID={{d.rows[i].COMM_TENANT_ID}}" target="_blank">更多商品</a>
            </div>
            </div>
            <div class="shop-order-goods" style="clear:both;"> 
            </div>
        </div>
        <div style="clear:both;"></div>
    </div>

        {{# } }} 
    </textarea>
    <textarea id="sys_goodslist_temp" style="display: none;">  
        {{# for(var i = 0, len = d.rows.length; i < len; i++){ }}
<a target="_blank" href="/c_GoodsView.htm?ID={{d.rows[i].GOODS_ID}}" title="{{d.rows[i].GOODS_NME}}" style="float:left;width:145px; margin:5px 5px 5px 0px;">
    <div style="height: 145px; width: 145px; text-align: center;">
        <img class="" src="{{d.rows[i].IMG_URL}}" style="max-width: 145px; height: 145px;" />
    </div>
    <div style=" font-weight:bold; font-size:15px; text-align:center; padding:1px;">
    <em style="color:#f40;">￥{{d.rows[i].GOODS_STRIKE_PRICE}}</em> 
     {{#if(d.rows[i].GOODS_OLD_PRICE!=''&&d.rows[i].GOODS_OLD_PRICE!='0.00'){}}
    <em style="color:#666; font-style:italic; text-decoration:line-through;">￥{{d.rows[i].GOODS_OLD_PRICE}}</em>
     {{# } }} 
    </div>
</a>
        {{# } }} 
    </textarea>
    <!-- foot script -->
</body>
</html>
